package StudyCode.summary.textfile;

import javax.print.attribute.HashPrintRequestAttributeSet;
import javax.print.attribute.PrintRequestAttributeSet;
import javax.print.attribute.standard.Destination;

/**
 * 版权所有 科技与人文(www.tah1986.com)
 */
public class PrintingToAFile {
	public static void main(String[] argv) throws Exception {
		try {
			PrintRequestAttributeSet aset = new HashPrintRequestAttributeSet();
			aset.add(new Destination(new java.net.URI("file:E:/Copy/out.ps")));

			// 实现打印内容
			System.out.println("打印成功");
		} catch (java.net.URISyntaxException e) {
		}
	}
}
